
#import <Cocoa/Cocoa.h>

@class Asset;

// An AssetCollection gathers information about "assets" (images and other media files) contained in a given filesystem directory.  Its primary attributes are the URL of the filesystem directory it references, and an array of Assets that provide information about the asset files contained therein.

@interface AssetCollection : NSObject
{
    NSURL *rootURL;                         // URL of folder whose content the AssetCollection represents
    NSMutableArray *assets;                 // Assets found in the collection's folder
    NSInteger previewImagePixelsPerSide; 
    BOOL inRefresh;                         // YES if collection is in the process of updating itself on a background thread
}
- initWithRootURL:(NSURL *)newRootURL;

- (NSURL *)rootURL;

- (NSArray *)assets;
- (void)setAssets:(NSArray *)newAssets;

- (void)insertObject:(id)obj inAssetsAtIndex:(NSUInteger)index;
- (void)removeObjectFromAssetsAtIndex:(NSUInteger)index;

// "previewImagePixelsPerSide" specifies the desired size of the catalog's preview images, in pixels per side
- (NSInteger)previewImagePixelsPerSide;

- (void)startRefresh;

- (void)addAsset:(Asset *)asset;
- (void)removeAsset:(Asset *)asset;

@end
